#include "../src/stackapp/stackapp.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

extern func_StackApp fun_StackApp;

int main(int argc, const char *argv[])
{
    int num = 0, base = 0;

    printf("请输入要转换的十进制的数字 : ");
    scanf("%d", &num);

    printf("请输入要转换的进制 : ");
    scanf("%d", &base);

    char buf[32] = {0};

    int ret = fun_StackApp.convert(num, base, buf);
    if (ret == 0)
        printf("转换后的数字为 ：%s\n", buf);
    else
        printf("转换异常，请确认参数！\n");

    return 0;
}
